// vite.config.js
import { defineConfig } from "file:///Users/gemiman/IdeaProjects/github/daoyi-ui-blog-vue3/node_modules/.pnpm/vite@5.2.12_sass@1.69.0/node_modules/vite/dist/node/index.js";
import vue from "file:///Users/gemiman/IdeaProjects/github/daoyi-ui-blog-vue3/node_modules/.pnpm/@vitejs+plugin-vue@4.4.0_vite@5.2.12_vue@3.3.4/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import commonjs from "file:///Users/gemiman/IdeaProjects/github/daoyi-ui-blog-vue3/node_modules/.pnpm/@rollup+plugin-commonjs@25.0.5/node_modules/@rollup/plugin-commonjs/dist/es/index.js";
import AutoImport from "file:///Users/gemiman/IdeaProjects/github/daoyi-ui-blog-vue3/node_modules/.pnpm/unplugin-auto-import@0.11.5_@vueuse+core@9.13.0/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///Users/gemiman/IdeaProjects/github/daoyi-ui-blog-vue3/node_modules/.pnpm/unplugin-vue-components@0.22.12_vue@3.3.4/node_modules/unplugin-vue-components/dist/vite.mjs";
import { ElementPlusResolver } from "file:///Users/gemiman/IdeaProjects/github/daoyi-ui-blog-vue3/node_modules/.pnpm/unplugin-vue-components@0.22.12_vue@3.3.4/node_modules/unplugin-vue-components/dist/resolvers.mjs";
import viteCompression from "file:///Users/gemiman/IdeaProjects/github/daoyi-ui-blog-vue3/node_modules/.pnpm/vite-plugin-compression@0.5.1_vite@5.2.12/node_modules/vite-plugin-compression/dist/index.mjs";
import { resolve } from "path";
import requireTransform from "file:///Users/gemiman/IdeaProjects/github/daoyi-ui-blog-vue3/node_modules/.pnpm/vite-plugin-require-transform@1.0.21/node_modules/vite-plugin-require-transform/dist/index.mjs";
import { createSvgIconsPlugin } from "file:///Users/gemiman/IdeaProjects/github/daoyi-ui-blog-vue3/node_modules/.pnpm/vite-plugin-svg-icons@2.0.1_vite@5.2.12/node_modules/vite-plugin-svg-icons/dist/index.mjs";
var __vite_injected_original_dirname = "/Users/gemiman/IdeaProjects/github/daoyi-ui-blog-vue3";
var vite_config_default = defineConfig({
  base: "/",
  root: process.cwd(),
  // 绝对路径
  resolve: {
    // 配置路径别名
    alias: [
      // 配置 @ 指代 src
      {
        find: "@",
        replacement: resolve(__vite_injected_original_dirname, "./src")
      }
    ],
    extensions: [".js", ".vue", ".json"]
  },
  // 按需导入element-plus main.js里不需要再引入了
  plugins: [
    vue(),
    commonjs(),
    // 自动导入element plus组件
    AutoImport({
      resolvers: [ElementPlusResolver()]
    }),
    Components({
      dts: true,
      dirs: "src/components",
      resolvers: [ElementPlusResolver()]
      // ElementPlus按需加载
    }),
    viteCompression({
      verbose: true,
      // 默认即可
      disable: false,
      //开启压缩(不禁用)，默认即可
      deleteOriginFile: false,
      //删除源文件
      threshold: 10240,
      //压缩前最小文件大小
      algorithm: "gzip",
      //压缩算法
      ext: ".gz"
      //文件类型
    }),
    // 让vite支持require
    requireTransform({
      fileRegex: /.js$|.vue$/
    }),
    // svg
    createSvgIconsPlugin({
      // Specify the icon folder to be cached
      iconDirs: [resolve(process.cwd(), "src/icons/svg")]
    })
  ],
  css: {
    preprocessorOptions: {
      // 引入全局scss
      scss: {
        additionalData: `@import "./src/styles/base.scss";`
      }
    }
  },
  server: {
    port: 8080,
    host: "0.0.0.0",
    https: false,
    open: true,
    // 热更新
    hmr: {
      overlay: false
    }
    // proxy: {
    //   // 本地后端代理
    //   "/api": {
    //     //要访问的跨域的域名
    //     // target: "http://192.168.1.2:48080/app-api",
    //     target: "http://127.0.0.1:38080/app-api",
    //     changeOrigin: true,
    //     rewrite: (path) => path.replace(/^\/api/, ""),
    //   },
    //   "/wapi": {
    //     // 网易云的音乐代理
    //     target: "http://192.168.1.2:48061",
    //     changeOrigin: true,
    //     rewrite: (path) => path.replace(/^\/wapi/, ""),
    //   },
    // },
  },
  // 打包输出
  build: {
    sourcemap: false,
    // 消除打包大小超过500kb警告
    chunkSizeWarningLimit: 4e3,
    rollupOptions: {
      input: {
        index: resolve("index.html")
      },
      // 静态资源分类打包
      output: {
        chunkFileNames: "static/js/[name]-[hash].js",
        entryFileNames: "static/js/[name]-[hash].js",
        assetFileNames: "static/[ext]/[name]-[hash].[ext]"
      }
    }
  }
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvZ2VtaW1hbi9JZGVhUHJvamVjdHMvZ2l0aHViL2Rhb3lpLXVpLWJsb2ctdnVlM1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiL1VzZXJzL2dlbWltYW4vSWRlYVByb2plY3RzL2dpdGh1Yi9kYW95aS11aS1ibG9nLXZ1ZTMvdml0ZS5jb25maWcuanNcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfaW1wb3J0X21ldGFfdXJsID0gXCJmaWxlOi8vL1VzZXJzL2dlbWltYW4vSWRlYVByb2plY3RzL2dpdGh1Yi9kYW95aS11aS1ibG9nLXZ1ZTMvdml0ZS5jb25maWcuanNcIjtpbXBvcnQgeyBkZWZpbmVDb25maWcgfSBmcm9tIFwidml0ZVwiO1xuaW1wb3J0IHZ1ZSBmcm9tIFwiQHZpdGVqcy9wbHVnaW4tdnVlXCI7XG5pbXBvcnQgY29tbW9uanMgZnJvbSBcIkByb2xsdXAvcGx1Z2luLWNvbW1vbmpzXCI7IC8vIFx1OEJBOXZpdGVcdTYyNTNcdTUzMDVcdTY1MkZcdTYzMDFjb21tb24uanNcdThCRURcdTZDRDVcbmltcG9ydCBBdXRvSW1wb3J0IGZyb20gXCJ1bnBsdWdpbi1hdXRvLWltcG9ydC92aXRlXCI7IC8vIFx1ODFFQVx1NTJBOFx1NUJGQ1x1NTE2NVx1N0VDNFx1NEVGNlxuaW1wb3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